#include <iostream>

using namespace std;
class Rectangle
{
private:
    double x, y;
public:
    Rectangle(double m, double n);
    void Perimeter();
    void Area();
};
int main()
{
    double m, n;
    cin >> m >> n;

    Rectangle A(m, n);

    A.Perimeter();
    A.Area();

    return 0;
}

Rectangle::Rectangle(double m, double n)
{
    x = m;
    y = n;
}

void Rectangle::Perimeter()
{
    cout << "The perimeter of a rectangle is " << 2*(x + y) << endl;
}

void Rectangle::Area()
{
    cout << "The area of a rectangle is " << x * y << endl;
}
